import java.util.Scanner;

public class Test {
    public static void add(int x){
        if(x<=9){
            System.out.printf("%d ",x);
        }
        else {
            add(x/10);
            System.out.printf("%d ",x%10);

        }
    }
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        add(n);
    }
}
